<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateDepartmentsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('departments', function (Blueprint $table) {
            $table->increments('id');                     // 部门ID
            $table->string('pid');                        // 区域ID 
            $table->string('name', 100);                  // 部门名称
            $table->integer('manager');                   // 管理者ID - 经理或者总监
            $table->string('remark');                     // 备注
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('departments');
    }
}
